<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>p4vasp.Property.Property</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="p4vasp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="../index.html">p4vasp</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        p4vasp ::
        Property ::
        Property ::
        Class&nbsp;Property
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="p4vasp.Property.Property-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Property</h1><p class="nomargin-top"><span class="codelink"><a href="p4vasp.Property-pysrc.html#Property">source&nbsp;code</a></span></p>
<center>

</center>
<hr />
<pre class="literalblock">
This object encapsulates all the information about a certain property:

- *name* - property name

- *value* - property value if available, or *None*

- *status* - can be one of

  Property.NOT_READY  - not read yet

  Property.READY      - property was read successfully and it is available

  Property.ERROR      - property reading failed for some reason

  Property.GENERATING - property is being generated using the *generator*

- *manager* - parent PropertyManager

- *thread* - running reading thread (if property was *required* and not yet *READY*)

- *read_func* - reading function, if specified

- *notify* - list of functions, that are called, when the property is available

- *generator* - generator for generating property (if specified)

</pre>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.Property.Property-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">value</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">manager</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">read</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">generator</span>=<span class="summary-sig-default">None</span>)</span><br />
      Create Property</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isPending"></a><span class="summary-sig-name">isPending</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns true if the property is being read in thread.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.isPending">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isGenerating"></a><span class="summary-sig-name">isGenerating</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns true if the property is being read using a generator.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.isGenerating">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get"></a><span class="summary-sig-name">get</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Return the property value immediately.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.get">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Apply the read_func.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_read"></a><span class="summary-sig-name">_read</span>(<span class="summary-sig-arg">self</span>)</span><br />
      This function is called in thread to obtain the property value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property._read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.Property.Property-class.html#require" class="summary-sig-name">require</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">notify</span>=<span class="summary-sig-default">None</span>)</span><br />
      Request the property.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.require">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.Property.Property-class.html#addNotify" class="summary-sig-name">addNotify</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">notify</span>)</span><br />
      Add new notify function/functions.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.addNotify">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.Property.Property-class.html#release" class="summary-sig-name">release</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Release the property.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.release">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="schedule"></a><span class="summary-sig-name">schedule</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">notify</span>=<span class="summary-sig-default">None</span>)</span><br />
      Schedule the property generator using the *p4vasp.schedule()*</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.schedule">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="scheduleFirst"></a><span class="summary-sig-name">scheduleFirst</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">notify</span>=<span class="summary-sig-default">None</span>)</span><br />
      Schedule the property generator on top of the queue using the 
      *p4vasp.scheduleFirst()*</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.scheduleFirst">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NOT_READY"></a><span class="summary-name">NOT_READY</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="READY"></a><span class="summary-name">READY</span> = <code title="1">1</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ERROR"></a><span class="summary-name">ERROR</span> = <code title="-1">-1</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="GENERATING"></a><span class="summary-name">GENERATING</span> = <code title="-2">-2</code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">value</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">manager</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">read</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">generator</span>=<span class="sig-default">None</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Create Property

- *name* - property name

- *value* - property value if available. If it is *None* (default),
  the value will be read using *read* function

- *manager* - parent PropertyManager

- *read* - reading function used for obtaining the property if specified.
It takes one argument, that will contain a reference to the Property object.

- *generator* - generator for generating property (if specified).
This is a python iterator object which has to contain a *next()* method.
This method is called as long as it does not throw *StopIteration*.
(See the Iterators section of the Python tutorial.)

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="require"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">require</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">notify</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.require">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Request the property. If the threading is permitted, then the read 
  function will be started in a separate thread. Othervise the property is 
  read immediately. The *notify* can contain a one or more (in a list) 
  notify functions, that are called with a reference to the Property as an 
  argument as soon as the property is available.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="addNotify"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">addNotify</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">notify</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.addNotify">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Add new notify function/functions. See *require()*.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="release"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">release</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.Property-pysrc.html#Property.release">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Release the property. The property *value* is cleared and status set 
  to *NOT_READY*. Also the *notify* list is cleared.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="p4vasp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="../index.html">p4vasp</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Aug 16 22:08:08 2015
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
